import fly from '@/utils/request'
import URL from '@/utils/host'
// 首页
export function index(data){
    return fly.request({
        method: 'get', 
        url:URL.host2+'index',
        params: data
    })
}
//首页砍价
export function spike(data){
    return fly.request({
        method: 'get', 
        url:URL.host2+'index/index/spike',
        params: data
    })
}
//首页拼拼班
export function ping(data){
    return fly.request({
        method: 'get', 
        url:URL.host2+'index/index/ping',
        params: data
    })
}
// 首页关注列表
export function attenList(data){
    // console.log(data)
    return fly.request({
        method: 'get', 
        url:URL.host2+'index/follow/list',
        params: data
    })
}

//首页关注 已关注成员
export function attenMember(data){
    // console.log(data)
    return fly.request({
        method: 'get', 
        url:URL.host2+'index/follow/members',
        params: data
    })
}

//首页关注 推荐
export function attenTuijian(data){
    // console.log(data)
    return fly.request({
        method: 'get', 
        url:URL.host2+'attention/tuijian',
        params: data
    })
}
// 首页推荐
export function recommend(data){
    return fly.request({
        method: 'get', 
        url:URL.host2+'index/recom/list',
        params: data
    })
}
// 首页专栏type==1 教育资讯type==2 悬赏问答type==3 视频type==4
export function article(data){
    console.log(data)
    return fly.request({
        method: 'get', 
        url:URL.host2+'index/article/'+data.type+'/list/'+data.status,
        params: data
    })
}
//详情
export function show(data){
    console.log(data)
    return fly.request({
        method: 'get', 
        url:URL.host2+'show',
        params: data
    })
}
//首页轮播图
export function indexads(data){
    console.log(data)
    return fly.request({
        method: 'get', 
        url:URL.host2+'index/ads',
        params: data
    })
}
//首页菜单
export function indexmenu(data){
    console.log(data)
    return fly.request({
        method: 'get', 
        url:URL.host2+'index/menu',
        params: data
    })
}
//首页导航
export function indexnav(data){
    console.log(data)
    return fly.request({
        method: 'get', 
        url:URL.host2+'index/nav',
        params: data
    })
}
//课程导航
export function courseCate(data){
    console.log(data)
    return fly.request({
        method: 'get', 
        url:URL.host2+'course/cate',
        params: data
    })
}
//课程分类列表
export function courseSpike(data){
    console.log(data)
    return fly.request({
        method: 'get', 
        url:URL.host2+'spike/cate_list',
        params: data
    })
}
export function coursePing(data){
    console.log(data)
    return fly.request({
        method: 'get', 
        url:URL.host2+'ping/cate_list',
        params: data
    })
}